//
//  RankingModel.m
//  i读
//
//  Created by 朱经扬 on 15/11/18.
//  Copyright © 2015年 123. All rights reserved.
//

#import "RankingModel.h"

@implementation RankingModel

-(NSString *)description{
    return [NSString stringWithFormat:@"RankingModel:\n rankId = %@ \n number = %@ \n isPraise = %@ \n user = %@ \n ranking = %@ \n praiseCount = %@ \n",@(self.rankId),@(self.number),self.isPraise,self.user,@(self.ranking),@(self.praiseCount)];
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    if (self) {
        self.rankId = [aDecoder decodeIntegerForKey:@"rankId"];
        self.number  = [aDecoder decodeIntegerForKey:@"number"];
        self.isPraise  = [aDecoder decodeObjectForKey:@"isPraise"];
         self.user = [aDecoder decodeObjectForKey:@"user"];
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder{
    [aCoder encodeInteger:self.rankId forKey:@"rankId"];
    [aCoder encodeInteger:self.number forKey:@"number"];
    [aCoder encodeObject:self.isPraise forKey:@"isPraise"];
    [aCoder encodeObject:self.user forKey:@"user"];
}

@end
